*===============================================================================
* Do-file creates "Household Survey Dataset: Violence and Cash Savings - Robustness"
* Table 6
*===============================================================================
clear
set more off

cd "~/Dropbox/VFD/REStat_Native_Files/Stata_Files"
local output "~/Dropbox/VFD/REStat_Native_Files/Stata_Files/Output"

use ema_master_NATIVE.dta, clear

 
/// TABLE 6 /// 
 
local demog age employed education female risk_likert
 
areg cash_savings  expects_violence IDF_01 if insample==1 & measured_sample==1, cl(pc) abs(pc)
est store col1
estadd local demog "NO"
estadd local pcFE "YES" 

areg cash_savings  expects_violence beta if insample==1 & measured_sample==1, cl(pc)  abs(pc) 
est store col2
estadd local demog "NO"
estadd local pcFE "YES"

areg cash_savings  expects_violence lifeladder if insample==1 & measured_sample==1, cl(pc)   abs(pc)
est store col3
estadd local demog "NO"
estadd local pcFE "YES"
  
areg cash_savings  expects_violence risk_likert if insample==1 & measured_sample==1, cl(pc)   abs(pc)
est store col4 
estadd local demog "NO"
estadd local pcFE "YES"

areg cash_savings  expects_violence q2mid if insample==1 & measured_sample==1, cl(pc)   abs(pc) 
est store col5
estadd local demog "NO"
estadd local pcFE "YES"

areg cash_savings  expects_violence IDF_01 beta lifeladder risk_likert q2mid if insample==1 & measured_sample==1, cl(pc) abs(pc) 
est store col6
estadd local demog "NO"
estadd local pcFE "YES"

areg cash_savings  expects_violence IDF_01 beta lifeladder risk_likert q2mid `demog' if insample==1 & measured_sample==1, cl(pc) abs(pc)
est store col7 
estadd local demog "YES"
estadd local pcFE "YES"

estout  col1 col2 col3 col4 col5 col6 col7, cells(b(fmt(%9.2f) star) se(par fmt(%9.2f))) ///
starlevels(* .1 ** .05 *** .01) style(tex) keep( expects_violence IDF_01 beta lifeladder risk_likert q2mid _cons)  ///
stats(N_clust N r2 demog pcFE, label("\# Clusters" "\# Observations" "R-Squared" "Demographic Controls" "Polling Center FE") fmt(0 0 3)) ///
 title("Cash Savings and Violence Expectations - National Sample") ///
 varlabels(expects_violence "Expects Violence (=1)" IDF_01 "Monthly Discount Factor" beta "Present-Bias Paramenter" lifeladder "Ladder of Life (0-10)" risk_likert ///
 "Financial Risk Likert (0-10)" q2mid "Holt-Laury Risk Measure"  _cons "Constant") 

 esttab col1 col2 col3 col4 col5 col6 col7 using "`output'/table_6.tex", cells(b(fmt(%9.2f) star) se(par fmt(%9.2f))) ///
starlevels(* .1 ** .05 *** .01) style(tex) keep( expects_violence IDF_01 beta lifeladder risk_likert q2mid _cons) ///
stats(N_clust N r2 demog pcFE, label("\# Clusters" "\# Observations" "R-Squared" "Demographic Controls" "Polling Center FE") fmt(0 0 3)) ///
 title("Cash Savings and Violence Expectations - National Sample") ///
 varlabels(expects_violence "Expects Violence (=1)" IDF_01 "Monthly Discount Factor" beta "Present-Bias Paramenter" lifeladder "Ladder of Life (0-10)" risk_likert ///
 "Financial Risk Likert (0-10)" q2mid "Holt-Laury Risk Measure"  _cons "Constant")  replace
